package com.wiloon.java8x.chinese;

import java.util.ArrayList;
import java.util.Random;

/**

 * User: Administrator
 * Date: 11/17/13
 * Time: 5:13 PM

 */
public class ShowChinese {

    public String create(int i, int j) throws Exception {

        String str = null;

        int hightPos, lowPos; // 定义高低位

        Random random = new Random();

        hightPos = (176 + Math.abs(i));//获取高位值

        lowPos = (161 + Math.abs(j));//获取低位值

        byte[] b = new byte[2];

        b[0] = (new Integer(hightPos).byteValue());

        b[1] = (new Integer(lowPos).byteValue());

        str = new String(b, "GBk");//转成中文

        return str;
    }
    // 测试
    public static void main(String[] args) throws Exception {
        ArrayList list = new ArrayList();
        ShowChinese test = new ShowChinese();
        for(int i=16;i<=55;i++) {
              for(int j=1;j<94;j++)  {
                  list.add(test.create(i, j));
                   //System.out.println(i+","+j+test.create(i, j));
              }
        }

//        for(int i=56;i<72;i++) {
//            for(int j=1;j<94;j++)  {
//
//                list.add(test.create(i, j));
//                System.out.println(i+","+j+test.create(i, j));
//            }
//        }
        for(int i=0;i<list.size();i++){
               for(int j=0;j<list.size();j++){
                     System.out.println(list.get(i).toString()+list.get(j));
               }
        }

    }



}
